const webpack = require('webpack')
const path = require('path')
const common = require('./webpack.common.js');
const { merge } = require('webpack-merge')
module.exports = merge(common, {
  mode: "development",
  devtool: "cheap-module-source-map",
  devServer: {
    open: true,
    contentBase: path.join(__dirname, 'public'),
    hot: true
  },
  target: 'web',// 因为和package.json的browserslist有冲突
  plugins: [
    new webpack.HotModuleReplacementPlugin(),// 开启模块热更新
  ]
})